﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Supersense.content;
using Supersense.db;

public partial class admin_law_doupdate : System.Web.UI.Page
{
    private Database db = new Database();
    private News obj = new News();
    public DataTable detail;
    protected void Page_Load(object sender, EventArgs e)
    {
        string subject = Request.Form["subject"].Trim();
        string eventdate = Request.Form["eventdate"];

        string content = Request.Form["content"].Trim();

        string author = Request.Form["author"].Trim();
        int settop = int.Parse(Request.Form["settop"].ToString().Trim());
        int newsid = int.Parse(Request.Form["id"].ToString().Trim());
        if (obj.update(subject, eventdate, "", settop, content, newsid))
        {
            Response.Write("<script type='text/javascript'>alert('您执行的操作成功了!')</script>");
            Response.Write("<meta http-equiv='refresh' content='0;url=list.aspx'/>");
        }
        else
        {
            Response.Write("<script type='text/javascript'>alert('您执行的操作失败了!');history.go(-1);</script>");
        }
    }
}
